package com.modulemanager.module

import com.libservice.RouteCompletion
import com.modulemanager.models.PageConfig
import com.modulemanager.page.PageInterface

interface ModuleInterface {
    interface Builder {
        val type: String

        fun build(id: String?): ModuleInterface?
    }

    val type: String

    val id: String?

    fun page(
        type: String?, id: String?, config: PageConfig?,
        params: Map<String, Any>?, hash: String?
    ): PageInterface?

    fun removePage(type: String, id: String?)

    fun handle(type: String?, params: Map<String, Any>?, completion: RouteCompletion?)
}